package xyz.wadewhy.basicstest.designPatterns.FactoryModel;

/**
 * @ClassName Tiger
 * @Description 跑的快，吃的快的动物行为
 * @Author zhongzihao
 * @Date 2021/12/18 10:53 上午
 * @Version 1.0
 **/
class FastBehavior implements AnimalBehaviorInterface {
    @Override
    public void run() {
        System.err.println("run fast");
        eat();
    }

    @Override
    public void eat() {
        System.out.println("eat fast...");
    }
}

/**
 * 跑的慢，吃的慢的动物行为
 */
class SlowBehavior implements AnimalBehaviorInterface {

    @Override
    public void run() {
        System.err.println("run slow");
        eat();
    }

    @Override
    public void eat() {
        System.err.println("eat slow...");
    }
}
